Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos DB documents no longer visible #971

Closed
critchie opened this issue Dec 6, 2018 · 23 comments
Closed

Cosmos DB documents no longer visible #971

critchie opened this issue Dec 6, 2018 · 23 comments
Assignees
Labels
🪲 regression Issue was working in a previous version ⚙️ cosmosdb Related to CosmosDB ✅ merged A fix for this issue has been merged
Milestone

Comments

@critchie
Copy link

critchie commented Dec 6, 2018

Storage Explorer Version: 1.6.0
Platform/OS: Windows
Architecture:
Regression From: Was this working in a previous version? Yes. 1.5.0

Bug description
After installing 1.6.0, when I navigate to my documents and click, the Documents tab is empty.

Steps to Reproduce
List the minimal steps clearly and concisely to reproduce the behavior:

  1. Open Storage Explorer
  2. Expand the Pay-As-You-Go
  3. Expand Cosmos DB Accounts (Preview)
  4. Expand my database account
  5. Expand my database
  6. Expand my collection
  7. Click on Documents

Expected Experience
I expected a tab to open in the right pane with my documents visible.

Actual Experience
Documents tab is opened but there are no documents.

Additional Context
I figure I'm missing a release note somewhere on this. I tried the --disable-gpu but that didn't help.

@scholtes
Copy link

scholtes commented Dec 6, 2018

I had the same problem updating to 1.6.0
Screenshot:
image
Green is redacted names, everything else in the screenshot is how it appears -- notice the blank black space in the open documents tab.

Some other notes:

  • Bug exists with other color themes
  • Bug exists when accessing document when using quck access and when not using quick access
  • After the 1.6.0 update I had to re-authenticate with Azure within Storage Explorer, and then "Remove from Quick Access" and re-"Add to Quick Access". This was not required following previous updates.

*Edit: might be a duplicate of #968

@ziyel ziyel self-assigned this Dec 7, 2018
@ziyel ziyel added ⚙️ cosmosdb Related to CosmosDB 🪲 bug Issue is not intended behavior ✅ by design Issue is intentional (not a bug) and removed ✅ by design Issue is intentional (not a bug) labels Dec 7, 2018
@ziyel ziyel added this to the 1.6.1 Release milestone Dec 7, 2018
@jkonecki
Copy link

jkonecki commented Dec 7, 2018

The JavaScript error which I believe is causing the issue:

No attribute loader for: partitionKeyValue error @ Debug.js:39 (anonymous) @ BindingHandler.js:27 tryCatch @ -internal.js:195 invokeCallback @ -internal.js:210 publish @ -internal.js:178 publishRejection @ -internal.js:120 flush @ asap.js:98 characterData (async) (anonymous) @ asap.js:70 asap @ asap.js:20 (anonymous) @ then.js:23 then @ then.js:26 NodeAttributeResolver.resolveAttributes @ NodeAttributeResolver.js:44 BindingHandler._evaluateAttribute @ BindingHandler.js:65 BindingHandler.updateValue @ BindingHandler.js:21 BindingHandlerSet.updateBoundArgument @ BindingHandlerSet.js:33 BindingHandlerSet.resolveArguments @ BindingHandlerSet.js:22 ActionViewModel.resolveArguments @ ActionViewModel.js:19 (anonymous) @ NodeViewModel.js:354 step @ CloudExplorerViewModel.js:34 (anonymous) @ CloudExplorerViewModel.js:15 (anonymous) @ CloudExplorerViewModel.js:9 __awaiter @ CloudExplorerViewModel.js:5 NodeViewModel.executeAction @ NodeViewModel.js:347 defaultAction @ NodeViewModel.js:552 NodeViewModel.executeDefaultAction @ NodeViewModel.js:560 NodeViewModel.handleClick @ NodeViewModel.js:587 (anonymous) @ knockout.js:79 dispatch @ jquery.js:4430 elemData.handle @ jquery.js:4116

@ziyel
Copy link
Member

ziyel commented Dec 7, 2018

Thanks for feeback.
We are preparing a hotfix for this.

@chrisparkeronline
Copy link

This is happening for me also. Forced to use the document explorer in Azure portal now until the hotfix!

@br14
Copy link

br14 commented Dec 9, 2018

I'm experiencing the same issue. Tried the suggested fix "./StorageExplorer.exe --disable-gpu" but it made no difference.

@AntonioJDios
Copy link

When will be ready the hot fix patch??

@ziyel
Copy link
Member

ziyel commented Dec 10, 2018

We will fix this in version 1.6.1 which is planning release in 17th Dec.

@darrengillis
Copy link

Temporary hack got this working again for me:
C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\out\DataExplorer\built\Platform\Daytona\DaytonaContext.js

//this.subscription = JSON.parse(this.parameters.metadata.subscription);
this.subscription = this.parameters.metadata.subscription;

@rasmuschristensen
Copy link

Same issue on mac, blank screen when clicking documents. The "hack" from @darrengillis made a temporary fix.

@craxal craxal added this to Committed in Storage Explorer via automation Dec 13, 2018
@craxal craxal closed this as completed Dec 13, 2018
Storage Explorer automation moved this from Committed to Done Dec 13, 2018
@craxal craxal added the ✅ merged A fix for this issue has been merged label Dec 13, 2018
@MRayermannMSFT
Copy link
Member

For anyone facing this issue, we're shipping a hotfix to fix this regression. Until then you can either do the hack as others have suggested, or if you'd like to preview the hotfix simply go to the "Help" menu on Windows and Linux/app menu on macOS ->" Opt in to Insider Builds" We'll still doing some final testing and a few other fixes, but we wanted to at least let people who needed the fixes we have done so far, have them. Thanks!

@richmwatts
Copy link

I am still experiencing this issue in 1.6.2, specifically seeing the js error that @jkonecki referenced in his comment. I have actually lost a lot of time on this thinking it was a setup issue.

Seeing the comment RE the line of code that is parsing subscription metadata. My azure account is connected to multiple Azure subscriptions as it is my company account - just thought I would add that piece of information incase it turns on any lightbulbs.

@richmwatts
Copy link

After deciding to dig into this a little more I think I have found the source of the issue.

This issue only effects Cosmos DB's created with the MongoDB API, as ones created with the SQL API allow Azure Storage Explorer to function correctly.

Inside of AzureDocumentDBActions.js there is a hard-coded Array of actions which appear to require a one-to-one mapping to the resourceType - it appears that the code is expecting this resourceType to be MongoDB when it is actually Azure Cosmos DB for MongoDB API see screenshot:

incorrect-resourcetype

I added some code to stop this and managed to get Storage Explorer to correctly show my collections. However, I then also noticed that the correct menu was not being shown when right clicking on my database to create a collection. See screenshot:

incorrect-menu

As you can see the Create Collection option is missing.

I believe I have tracked this issue down to the expression builder used to toggle the visibility of the menu option in question. See screenshot:

permission-issue

I believe this is also likely related to the original issue (an incorrect resourceType) as modifying the expression to expect the string Azure Cosmos DB for MongoDB API will correctly render the Create Collection menu option.

I also noticed that when creating a Cosmos DB account in the Azure Portal the API dropdown has this string as the Mongo option. See screenshot:

portal-creation

Hope this helps.

Rich

@chrisparkeronline
Copy link

Great investigation Rich!

@rasmuschristensen
Copy link

awesome @richmwatts . I'm using the SQLAPI and after the hotfix it works for me again.

@craxal
Copy link
Contributor

craxal commented Jan 28, 2019

@richmwatts, great work! I don't suppose you'd be interested in contributing if this project were open sourced (#138)?

@ziyel
Copy link
Member

ziyel commented Jan 29, 2019

@richmwatts, awesome investigation.
I have reopened the issue. And will close it after we fix the Mongo DB issues.

@ziyel ziyel reopened this Jan 29, 2019
@ziyel ziyel modified the milestones: 1.6.1, 1.7.0 Jan 29, 2019
@ziyel ziyel added the 🪲 regression Issue was working in a previous version label Jan 29, 2019
@richmwatts
Copy link

richmwatts commented Jan 29, 2019

No problem at all guys. Enjoyed it, love problem solving 👍 @craxal As for wanting to contribute, absolutely!

@MRayermannMSFT MRayermannMSFT added this to Committed in Storage Explorer via automation Feb 21, 2019
@craxal craxal removed the 🪲 bug Issue is not intended behavior label Feb 26, 2019
@craxal craxal moved this from Committed to In Progress in Storage Explorer Feb 26, 2019
@MRayermannMSFT
Copy link
Member

Fix was merged a few days ago for 1.7.0.

Storage Explorer automation moved this from In Progress to Done Feb 27, 2019
@akshaybabloo
Copy link

I still can't seem to see the documents

@craxal
Copy link
Contributor

craxal commented Jan 28, 2020

@akshaybabloo If you are still having problems, please open a new issue.

@joedevgee
Copy link

Still not able to see documents with Mongo protocol. I don't think it matters but here is my system info

Version: 1.13.0
AzCopy Version: 10.4.2

Platform: macOS
Architecture: x64 
Build Number: 20200430.5 
Commit: c82c50eca 
Support ID: 55ae0cb1-287f-89f2-cebf-7cadf440b255 

@craxal
Copy link
Contributor

craxal commented May 14, 2020

@joedevgee Can you open a new issue, please? This issue has been closed for a while.

@jsutes
Copy link

jsutes commented Jul 29, 2020

Here's the link to the new issue for MongoDB: #2584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 regression Issue was working in a previous version ⚙️ cosmosdb Related to CosmosDB ✅ merged A fix for this issue has been merged
Projects
Development

No branches or pull requests